Motion and Presence Detection Users Guide

Table of Contents

Introduction

The Motion and Presence Detection Demo is the TI mmWave SDK5 out-of-box demo project for low power architecture EVMs, like the xWRL6432 and xWRL1432. It is designed to showcase the capabilities of TI’s mmWave low power sensors by using the SDK5 APIs and tools to form an application that includes device configuration, processing, and visualization of the processed data.

You can choose between two visualizer tools provided by TI for this demo:

Quickstart xWRLx432 Device

Requirements

Tool Version Download Link
XDS110 Drivers Latest XDS Emulation Software
TI mmWave SDK 5.5.4.x (xWRLx432) MMWAVE-L-SDK
UniFlash Latest Download UniFlash
Access UniFlash through the Cloud

Using the Radar Toolbox Industrial Visualizer

1. Configure the EVM for Flashing Mode

  1. Connect your EVM to the micro USB port and follow the steps below. You do not need to connect to the barrel jack.

  2. Place the device into Flashing Mode by setting the switches as shown.

  3. Then, toggle the reset button (circled in green) to latch in the mode.

2. Flash the EVM using Uniflash

Flash the appropriate binary from the prebuilt binaries folder using UniFlash. Follow the instructions for using UniFlash Prebuilt release binaries can be found in <MMWAVE_SDK5_INSTALL_DIR>\examples\mmw_demo\motion_and_presence_detection\prebuilt_binaries

3. Configure the EVM for Functional Mode

  1. Place the device into Functional Mode by setting the switches as shown in the visualizer. For more help on device setup, follow the steps in the EVM Setup Guide for your specific EVM.

  2. Then, toggle the reset button (circled in green) to latch in the mode.

4. Open the Radar Toolbox Industrial Visualizer

Navigate to the Radar Toolbox download location and find the Industrial Visualizer directory at <RADAR_TOOLBOX_INSTALL_DIR>\tools\visualizers\Applications_Visualizer\Industrial_Visualizer\. Then, run the visualizer either directly from source with python gui_main.py, or as an executable by running the Industrial_Visualizer.exe

📝 NOTE
In general, running the visualizer from the Python source runs faster and results in fewer errors over long periods of time. If running Python directly from source, use Python version 3.7.3, and run the setUpEnvironment.bat script first to ensure all the correct packages and versions are installed.

5. Connect the Device

  1. Look for the “XDS110 Class Application/User UART” COM port in your Device Manager, and select this port in the GUI. If you do not see this, you need to install the XDS110 drivers listed in the Requirements section above.

  2. Make sure the correct device is selected and choose the COM port found in the previous step, and then select “Connect”.

6. Send Device Configuration

In the “Configuration” section, click on “Select Configuration”. Select one of the pre-written configurations in <RADAR_TOOLBOX_INSTALL_DIR>\source\ti\examples\Industrial_and_Personal_Electronics\motion_and_presence_detection\chirp_configs\. Then, click “Start and Send Configuration”

In the visualizer’s console window commands should be seen being sent to the device.

7. View Plots

Once commands are sent, users can view the point cloud plot on the same page (if presence detection is enabled). Please refer to the Industrial Visualizer Documentation located at <RADAR_TOOLBOX_INSTALL_DIR>\tools\visualizers\Applications_Visualizer\docs\mmWave_Applications_Visualizer_User_Guide.html for more information about how to use this tool.

Getting Started Tuning the Device

For information about getting started tuning the performance of the sensor, please see the mmWave SDK5 Presence and Motion Tuning Guide: <MMWAVE_SDK5_INSTALL_DIR>/docs/MotionPresenceDetectionDemo_TuningGuide.pdf

Developer’s Guide

Tuning by Application

The motion and presence demo hosts a variety of features that can be user-enabled and customized to fit various applications. These applications range from people tracking and classification for TV applications to presence detection for doors and gates applications. Each of the extra features like people tracking, classification, and overhead setups have dedicated resources to highlight these enhanced features and the implementation/configuration details to enable them.

These enhanced features can be further explored in the following folders under <RADAR-TOOLBOX-INSTALL-LOCATION>/ti/examples/Industrial_and_Personal_Electronics/:

These folders contain documentation on the various CLI changes and underlying software and theory to enable these features. However, the configurations and software(source code and prebuilt binaries) is all the same and can be found in the Motion and Presence Detection folder.

The base presence detection feature of this demo does not require any custom CLI additions to enable these features; the new 3D clustering features were implemented as part of the motion and presence DPU. With this new 3D clustering feature, users can now detect objects in zones that are separated in height for applications such as pet vs human detection or sit vs stand detection. However, for TV applications where the goal is to just detect if a person is in the room, 2D clustering can be enabled instead.

Configurations for the height-based presence detection applications can be found in the chirp_configs/height_based_detection/ folder while the 2D presence detection configurations can be found in the MMWAVE-L-SDK under

<MMWAVE-L-SDK-INSTALL-LOCATION>/examples/mmw_demo/motion_and_presence_detection/profiles

Build the Firmware from Source Code

1. Software Requirements

Tool Version Download Link
TI mmWave SDK 5.5.4.x (xWRLx432) mmWave SDK 5.x.x.x
Code Composer Studio CCS 12.2 or later Code Composer Studio
XDS110 Drivers Latest XDS Emulation Software

2. Import Project

The mmWave SDK Motion and Presence Detection Demo CCS Project is available on TI Resource Explorer under mmWave Sensors → Radar Toolbox. You can import the project in your CCS workspace using TI Resource Explorer in CCS or by importing the projectspec from a local copy of the toolbox. Both methods of importing projects are defined below. To get started, open CCS and set up your workspace as desired.

Importing via TI Resource Explorer in CCS

.

Importing via CCS Import Projectspecs

📝 NOTE
Project Workspace
When importing projects to a workspace, a copy is created in the workspace. It is important to note that the copy in user’s workspace is the one that gets built and all modifications will only be implemented for the workspace copy. The original project downloaded in the Radar Toolbox is not modified.

3. Build the Project

There is only one project in Project Explorer, right click on the project name and select Rebuild Project.

🛑 Before Continuing!
Build Fails with Errors
If the build fails with errors, please ensure that all the prerequisites are installed as mentioned in the previous steps.

4. Execute the Project

There are two ways to execute the compiled code on the EVM:

Understanding Output Data Formats

The Low Power Visualizer and Industrial Visualizer are used to visualize processed output data from the mmWave radar device. This data is processed on-chip, and packaged into a TLV format. To understand this format, reference Understanding UART Data Output. Additionally, raw ADC data can be saved for offline processing using the DCA1000 EVM.

📝 NOTE
Output Data versus Raw ADC Data
Output data refers to point cloud data (x,y,z,v). Raw ADC data refers to digitally sampled sensor data. For raw ADC data capture, check out the xWRL6432 Raw Data Over SPI Fundamentals demo.

Understanding the Toolbox Data Processing Chain Vs SDK Data Processing Chain

The motion and presence demo follows a data processing chain (DPC) to convert the ADC samples into meaningful data for further use, such as pointcloud and range-azimuth heatmaps. This processing chain is constructed using various data processing units (DPUs). The motion and presence demo in the MMWAVE-L-SDK utilizes a set of DPUs that reside in the SDK as well and perform the necessary functions to do basic motion and presence detection. However, the toolbox also contains a set of DPUs based on the SDK DPUs that have been further modified to enable the new features described in the release notes, such as height-based presence detection, slow movement detection, and ceiling-mount support. Please refer to the x432 datapath documentation in the toolbox for more information on the algorithm changes made to enable these features.

2D vs 3D Clustering in Motion and Presence Detection Demo

The motion and presence demo provides two clustering options: 2D or 3D clustering. 2D clustering only factors in the x and y coordinates of points when creating clusters, while 3D factors in the z coordinate as well. 3D clustering is instrumental to the functionality of height-based presence detection, while 2D clustering is used for 2D presence detection. To enable both, a compile-time flag was used to either enable 2D or 3D clustering. 3D clustering is enabled by default, but to enable 2D clustering, make sure the CLUSTERING_2D flag is defined in the software or in the projectspec prior to importing into CCS.

NOTE: For 2D clustering, it is recommended to adjust the clustering max distance in the clusterCfg CLI command to 0.5 meters

Need More Help?